﻿@model dynamic

@{   
    int k = 0;
    int destino = 0;
    int destinoAux = 0;
}
<table border="0" style="width:300px;">
    <tr>
        <td>Imprimir<img src="@Url.Content("~/images/impresora.gif")" class="lupita1"  alt="IMPRIMIR" onclick="javascript: reporteCargoDet('#divDetalle','2');" /></td>
        <td>Bajar a Excel<img src="@Url.Content("~/images/fileicons/xls.png")" class="lupita1"  alt="BAJAR A EXCEL" onclick="javascript: reporteCargoDet('#divDetalle','3');" /></td>        
    </tr>
</table>
<table class="Reporte1" id="tbr">     
    @foreach (var item in Model)
    {
        k++;
        destino = Convert.ToInt32(@item.destino);
        if ((destino != destinoAux))
        {
            destinoAux = destino;            
            <tr>
                <td colspan="6">Destino: <b>@item.destinoDescr</b></td>
            </tr>
        <tr>
            <th style="width:10px;">#</th>
            <th style="width:30px;">Paso</th>        
            <th style="width:100px;">Número Solicitud</th>
            <th>Solicitante</th>
            <th style="width:100px;">Fecha Registro</th>
            <th style="width:100px;">Fecha Derivación</th> 
        </tr>
            k = 1;
        }  
        <tr class="@(k%2 != 0 ? "odd" : "even")">
            <td>@k]</td> 
            <td>@item.nSeqPaso</td>         
            <td onclick="javascript:reporteDetConvocatoria('@item.nIdeSol');">@item.solicitud</td>
            <td>@item.solicitante</td>
            <td>@String.Format("{0:dd/MM/yyyy HH:MM}", item.dtFecRegistro)</td>
            <td>@String.Format("{0:dd/MM/yyyy HH:MM}", item.fecDerivacion)</td>
        </tr>        
    }
</table>
